import request from '@/utils/request.js'

//获取所有数据
export const getUsageList = (params) => {
    return request ({
        url:'/parking/usage',
        method:'get',
        params
    })
}
// 获取表单信息
export const getHouseInfoApi = (id) => {
    return request({
      url: '/house/building/' + id,
      method: 'get',
    })
  }

// 获取对应的车辆
export const getUsageApi = (code) => {
    return request({
        url: '/parking/index?community_code=' + code,
        method: 'get'
    })
}

//新增
export const addUsageApi = (data) => {
    return request ({
        url:'/parking/usage',
        method:'post',
        data
    })
}

//修改
export const editUsageApi = (data) => {
    return request ({
        url:'/parking/usage/'+data.id,
        method:'put',
        data
    })
}

export const getUsageInfo = (id) => {
    return request ({
        url:'parking/usage/'+id,
        method:'get',

    })
}
// 删除表单信息
export const delUsageApi = (id) => {
    return request({
      url: '/parking/usage/' + id,
      method: 'delete',
    })
  }
  

// current: 1
// pageSize: 10
// name: 
// community_code: 
// license_plate: 
// owner: 
// tel: 
// type: 0
// create_time:''